function backDeviceGroupAdd() {
	window.location.href = 'userParameter.jsp'

}

function submitData() {
	if(!$("#abc option:selected").val() == "" || !$("#paramKey").val() == "" || !$("#paramValue").val() == "") {
		var param = {
			session: $.Cookie("session"),
			userId: $.Cookie("userId"),
			companyId: $.Cookie("companyId"),
			paramType: $("#abc option:selected").val(),
			paramKey: $("#paramKey").val(),
			paramValue: $("#paramValue").val(),
			desc: $("#desc").val(),
		}
		$.ajax({
			url: 'addParamType',
			type: 'POST',
			data: param,
			dataType: 'json',
			success: function(data) {
				if(data.errorCode == 0) {
					alert("提交成功了！")
					window.location.href = 'userParameter.jsp';

				} else if(data.errorCode == -6) {
					alert("登录超时！")
					top.location.href = 'index.jsp';
				} else if(data.errorCode == -301) {
					alert("基础数据已存在！请勿重新添加！")
				} else {
					alert("请重试！")
				};
			},
			error: function(err) {
				alert("连接服务器失败！请重新提交！");
					top.location.href = 'index.jsp';
				
			}
		});
	}
}